import request from '@/utils/request'

// 查询套餐管理列表
export function listCombo(query) {
  return request({
    url: '/system/familyCombo/list',
    method: 'get',
    params: query
  })
}

//获取全部商品信息
export function listAll(query) {
  return request({
    url: '/system/familyCombo/allDishesList',
    method: 'get',
    params: query
  })
}

// 查询套餐管理详细
export function getCombo(comboDishesId) {
  return request({
    url: '/system/familyCombo/' + comboDishesId,
    method: 'get'
  })
}

// 新增套餐管理
export function addCombo(data) {
  return request({
    url: '/system/familyCombo',
    method: 'post',
    data: data
  })
}

// 修改套餐管理
export function updateCombo(data) {
  return request({
    url: '/system/familyCombo',
    method: 'put',
    data: data
  })
}

//修改管理状态
export function changeComboStatus(comboDishesId, packageId) {
  const data = {
    comboDishesId,
    packageId
  }
  return request({
    url: '/system/familyCombo/changeStatus',
    method: 'put',
    data: data
  })
}

//购物车修改
export function shoppingChange(dishesId,shoppingChange) {
  const data={
    dishesId,
    shoppingChange
  }
  return request({
    url: '/system/coldDishes/shoppingChange',
    method: 'put',
    data: data
  })
}

// 删除套餐管理
export function delCombos(comboDishesId) {
  return request({
    url: '/system/familyCombo/' + comboDishesId,
    method: 'delete'
  })

}
